package com.xzx.helloworld;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

/**
 *
 * @author xinzhixuan
 * @version 1.0
 * @date 2025/10/15 11:45
 */
public class TimerPojoEncoder extends MessageToByteEncoder<UnixTime> {
    @Override
    protected void encode(ChannelHandlerContext ctx, UnixTime msg, ByteBuf out) throws Exception {
        System.out.println("encode");
        out.writeInt((int)msg.value());
    }
}
